package com.xinzhi.controller;

import com.xinzhi.pojo.dto.TransferAccounts;
import com.xinzhi.service.ITransferAccountsService;
import com.xinzhi.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户转账的控制层
 */
@RestController
public class TransferAccountsController {
    @Autowired
    private ITransferAccountsService transferAccountsService;


    /**
     * 用户转账接口
     * @param transferAccounts 转账参数
     * @return Result
     */
    @PostMapping("/transfer")
     public Result transfer(@RequestBody TransferAccounts transferAccounts){
         return transferAccountsService.transfer(transferAccounts);
     }


}
